/*
 * @Author: your name
 * @Date: 2021-04-30 09:49:01
 * @LastEditTime: 2021-05-06 09:43:32
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \bairui after\bairuimcr\src\api\daima.js
 */
// 代码
import request from "@/utils/request";

export function z(data) {
  return request({
    url: "backend/article/save",
    method: "POST",
    data: {
      id: data.id,
      cate_id: data.cate_id,
      // member_id: data.member_id,
      sort: data.sort,
      title: data.title,
      image: data.image,
      content: data.content,
      created_at: data.created_at,
      updated_at: data.updated_at,
      getmember: data.getmember,
      cate: data.cate,
    },
  });
}

export function s(id) {
  return request({
    url: `backend/article/delete?id=${id}`,
    method: "DELETE",
    data: {
      id: id,
    },
  });
}

export function g(data) {
  return request({
    url: "backend/article/update",
    method: "POST",
    data: {
      id: data.id,
    },
  });
}

export function c() {
  return request({
    url: "backend/article/index",
    method: "GET",
  });
}
